{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a2cc2a26",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "现在的时间分是偶数\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "minuteRightNow = datetime.today().minute\n",
    "\n",
    "if minuteRightNow in odds:\n",
    "    print('现在的时间分是奇数')\n",
    "else:\n",
    "    print('现在的时间分是偶数')\n",
    "\n",
    "#常见的数字模型:\n",
    "#整形(int):用来存放整数,33,66,897\n",
    "#浮点型(float):用来存放小数,0.78,3.64\n",
    "#字符串型(str):用来存放字符串,'课堂'\n",
    "\n",
    "#注意:input函数取得的参数都是字符串型\n",
    "\n",
    "#只有相同的数字模型才可以进行数字运算\n",
    "\n",
    "#可以通过int(),float(),str()来进行类型转换\n",
    "\n",
    "#可以用type()来判断数据的模型\n",
    "\n",
    "#注释:在Python中注释符号是#,用来忽略一段代码\n",
    "\n",
    "#在Python中用and表示而且的意思,and运算符将考察左右两边变量的真假,若两边变量均为真,则输出结果为真,若有一边变量为假,则输出结果为假\n",
    "\n",
    "#用or表示或者的意思,or运算符将考察左右两边变量的真假,只要有一边为真,则输出结果为真,只有左右两边变量都为假时,输出结果才为假\n",
    "\n",
    "#not运算符仅计算单个变量,被称作单目运算符,会转换变量的真假"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f4377d1c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
